<template>
  <div>
    <p>此时的count值为：{{$store.state.count}}</p>
    <p>此时的count值为：{{count}}</p>
    <p>此时的count值为：{{$store.getters.showNum}}</p>
    <p>此时的count值为：{{showNum}}</p>
    <my-addition class="btn"></my-addition>
    <my-subtraction class="btn"></my-subtraction>
  </div>
</template>

<script>
import Addition from './components/Addition'
import Subtraction from './components/Subtracttio'
import { mapState, mapGetters } from 'vuex'

export default {
  data () {
    return {}
  },
  components: {
    'my-addition': Addition,
    'my-subtraction': Subtraction
  },
  computed: {
    ...mapGetters(['showNum']),
    ...mapState(['count'])
  }
}
</script>

<style scoped>
</style>
